<?php

class favourite_pages {
	public function __construct(){
		FunctionsHelper::includeFiles(
			array(
				PUBLIC_MODELS_DIRECTORY . 'model.php',
				PUBLIC_MODELS_DIRECTORY . 'favourite_page.php'
			)
		);
	}
	
	public function getAllLinks(){
		$arrFavouriteLinks = array();
		
		$FavouriteLink = new favourite_page();
		$arrLinks = $FavouriteLink->getAll();
		foreach ($arrLinks as &$link){
			$FavouritePage = new favourite_page(
				array(
					'id' => $link['favourite_page_id'],
					'name' => $link['name'],
					'link' => $link['link'],
					'image' => $link['image']
				)
			);
			$arrFavouriteLinks[] = $FavouritePage;
		}
		return $arrFavouriteLinks;
	}
}

?>